package us.wili.dev.client.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import us.wili.dev.client.model.rsp.GoodsRsp;
import us.wili.dev.client.service.ClientGoodsService;
import us.wili.dev.common.model.ResponseDto;
import us.wili.dev.common.util.ResponseUtil;

@Validated
@RestController
@RequestMapping("/api/goods")
@Api(tags = "商品")
public class GoodsController {
    @Autowired
    private ClientGoodsService clientGoodsService;

    @ApiOperation(value = "商品详情", nickname = "goodsdeta")
    @RequestMapping(value = "/goodsdeta", method = RequestMethod.GET)
    public ResponseDto<GoodsRsp> goodsdeta(Long id){
        GoodsRsp rsp =clientGoodsService.goodsdeta(id);
        return ResponseUtil.getSuccessRsp(rsp);
    }


}
